    var lastScrollTop = 0;
    window.onscroll = function () {
        var header = document.querySelector('.header');
        var st = window.pageYOffset || document.documentElement.scrollTop;
        if (st > lastScrollTop) {
            // 如果是向下滚动
            if (st > 800) {  // 当滚动高度大于800px时改变颜色
                header.style.backgroundColor = 'rgba(255, 106, 0, 1)';  // 改变颜色
            } else {
                header.style.backgroundColor = 'rgba(51, 51, 51, 0.5)';  // 恢复原颜色
            }
            header.style.height = '0';
            header.style.padding = '0';
            header.style.border = '0';
        } else {
            // 如果是向上滚动
            header.style.height = '65px';
            header.style.padding = '10px';
            header.style.border = '1px solid transparent';
            if (st < 800) {  // 当滚动高度小于800px时恢复原颜色
                header.style.backgroundColor = 'rgba(51, 51, 51, 0.5)';  // 恢复原颜色
            }
        }
        lastScrollTop = st <= 0 ? 0 : st; // 为了方向改变时更新lastScrollTop
        var company = document.querySelector('.company');
        var companyText = document.querySelector('.company-text');
        var companyImg = document.querySelector('.company img');
        var companyTop = company.getBoundingClientRect().top;
        var windowHeight = window.innerHeight;

        if (companyTop <= windowHeight / 2) {  // 当滚动到.company部分的一半时触发动画
            companyText.style.animation = 'slideUp 5s ease-out';
            companyImg.style.animation = 'slideDown 5s ease-out';
        }


    };

